<html>

<%@ include file="../common/IncludeTop.jsp"%>

<script type="text/javascript">
    function changeCode(){
        document.getElementById("img").src="${pageContext.request.contextPath}/web.servlet/CheckCodeServlet?"+Math.random();
    }

</script>
<div id="Catalog">

    <%--    <stripes:form--%>
    <%--        beanclass="org.mybatis.jpetstore.web.actions.AccountActionBean"--%>
    <%--        focus="">--%>
    <form action="signOnAccount" method="post">
        <p>Please enter your username and password.</p>
        <p><table>
        <tr>
            <td>Username</td>
            <td><input type="text" name="username" required="required" ></td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="password" name="password" required="required"></td>
        </tr>
        <tr>
            <td>CheckCode</td>
            <td><input type="text" name="checkcode" autocomplete="off" required="required"></td>

        </tr>
        <tr>
            <td colspan="2"><img id="img" src="${pageContext.request.contextPath}/web.servlet/CheckCodeServlet" alt="Loading..." οnclick="changeCode()">
                <a href="javascript:changeCode()" οnclick="changeCode()">Click to Change.</a></td>
        </tr>
<%--        <tr>--%>
<%--            <td><input type="submit" value="Login"></td>--%>
<%--            <td><input type="button" value="Sign up" onclick="reg()" ></td>--%>
<%--        </tr>--%>
    </table>
        </p>
        <br/>
        <p><input type="submit" value="login"></p>
        <td colspan="2" align="right">
            <font color="red">${requestScope.msg}</font>
            <font color="red">${sessionScope.msg}</font>
        </td>

        <br/>
        Need a user name and password?
        <a href="newAccount">Register Now!</a>
    </form>
<%@ include file="../common/IncludeBottom.jsp"%>


</html>